package top.xchch.creational.adapter.objectadaptor;

public class RedmiNote8Pro {

    // 充电
    public void charging(IVoltage5V iVoltage5V) {
        int dest = iVoltage5V.output5V();
        if(dest == 5) {
            System.out.println("电压为5V, 可以充电~~");
        } else if (dest > 5) {
            System.out.println("电压大于5v, 不能充电!!!");
        }
    }
}
